<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增监测项')" />
	<th:block th:include="include :: select2-css" />
</head>
<body>
    <div class="form-content">
        <form id="form-item-add" class="form-horizontal">
            <input name="deptId" type="hidden" id="treeId"/>
            <h4 class="form-header h4">基本信息</h4>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>监测项名称：</label>
                        <div class="col-sm-8">
                            <input name="itemName" autocomplete="off" placeholder="请输入监测项名称" class="form-control" type="text" >
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>设备类型名称：</label>
                        <div class="col-sm-8">
                            <input name="sblxName" autocomplete="off" placeholder="请输入设备类型名称" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>单位中文：</label>
                        <div class="col-sm-8">
                            <input name="unitZh" autocomplete="off" placeholder="请输入单位中文" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>单位符号：</label>
                        <div class="col-sm-8">
                            <input name="unitFlag" autocomplete="off" class="form-control" type="text"  placeholder="请输入单位符号">
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>上限阀值：</label>
                        <div class="col-sm-8">
                            <input name="fzUp" placeholder="请输入上限阀值" class="form-control" type="number" />
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"><span style="color: red; ">*</span>设备名称：</label>
                            <div class="col-sm-8">
                                <input name="sbName" placeholder="请输入设备名称" autocomplete="off" class="form-control " type="text"  >
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label"><span style="color: red; ">*</span>所属泵站：</label>
                        <div class="col-sm-8">
                            <input name="pumpCode" placeholder="请输入所属泵站" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <div class="form-group">
                            <label class="col-sm-4 control-label"><span style="color: red; ">*</span>下限阀值：</label>
                            <div class="col-sm-8">
                                <input name="fzDown" placeholder="请输入下限阀值" autocomplete="off" class="form-control " type="number" >
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否有效：</label>
                        <div class="col-sm-8">
                            <div class="input-group " style="width: 100%">
                                <select name="isValid" class="form-control m-b" th:with="type=${@dict.getType('biz_is_valid')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否需要上下限报警：</label>
                        <div class="col-sm-8">
                            <div class="input-group " style="width: 100%">
                                <select name="isUpdownWarning" class="form-control m-b" th:with="type=${@dict.getType('biz_is_delete')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">是否信号报警：</label>
                        <div class="col-sm-8">
                            <div class="input-group " style="width: 100%">
                                <select name="isFlagWarning" class="form-control m-b" th:with="type=${@dict.getType('biz_is_delete')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-4 control-label">删除标志：</label>
                        <div class="col-sm-8">
                            <div class="input-group " style="width: 100%">
                                <select name="isDeleted" class="form-control m-b" th:with="type=${@dict.getType('biz_is_delete')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <h4 class="form-header h4">其他信息</h4>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">备注：</label>
                        <div class="col-xs-10">
                            <textarea name="remark" autocomplete="off"   class="form-control" rows="3">[[*{remark}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
	<th:block th:include="include :: footer" />
	<th:block th:include="include :: select2-js" />
	<script>
	    var prefix = ctx + "biz/item";
        
        function submitHandler() {
	        if ($.validate.form()) {
	        	var data = $("#form-item-add").serializeArray();
	        	$.operate.saveTab(prefix + "/add", data);
	        }
	    }
    </script>
</body>
</html>
